Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / feature / map / src / commonTest / kotlin / org / meshtastic / feature / map / MapTimeWindowsTest.kt

Displaying Raw • Download

feature/map/src/commonTest/kotlin/org/meshtastic/feature/map/MapTimeWindowsTest.kt renovate/fastlane-2.x-lockfile (056eed64) Text, 1.55 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.map

Tff7b72import T7ee787kotlin.test.Test
Tff7b72import T7ee787kotlin.test.assertFalse
Tff7b72import T7ee787kotlin.test.assertTrue

Tff7b72class T56d364MapTimeWindowsTest Tb4b4b4{

Tf0883e@Test
Tff7b72fun Td2a8ff`the any filter keeps every point however old`Tb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3assertTrueTb4b4b4(Te6edf3LastHeardFilterTb4b4b4.Te6edf3AnyTb4b4b4.Te6edf3includesTb4b4b4(Te6edf3recordedAtSeconds Tff7b72= T79c0ff0Tb4b4b4, Te6edf3nowSeconds Tff7b72= T79c0ff1Te6edf3_000_000Tb4b4b4)Tb4b4b4)
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8ff`a point inside the window is kept and one outside is dropped`Tb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3now Tff7b72= T79c0ff1T79c0ff0Te6edf3_000L
Te6edf3assertTrueTb4b4b4(Te6edf3LastHeardFilterTb4b4b4.Te6edf3OneHourTb4b4b4.Te6edf3includesTb4b4b4(Te6edf3recordedAtSeconds Tff7b72= T79c0ff9Te6edf3_000Tb4b4b4, Te6edf3nowSeconds Tff7b72= Te6edf3nowTb4b4b4)Tb4b4b4)
Te6edf3assertFalseTb4b4b4(Te6edf3LastHeardFilterTb4b4b4.Te6edf3OneHourTb4b4b4.Te6edf3includesTb4b4b4(Te6edf3recordedAtSeconds Tff7b72= T79c0ff1T79c0ff0T79c0ff0Tb4b4b4, Te6edf3nowSeconds Tff7b72= Te6edf3nowTb4b4b4)Tb4b4b4)
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8ff`a node heard within the pulse window pulses`Tb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3assertTrueTb4b4b4(Te6edf3heardJustNowTb4b4b4(Te6edf3lastHeard Tff7b72= T79c0ff9T79c0ff9T79c0ff8Tb4b4b4, Te6edf3nowSeconds Tff7b72= T79c0ff1Te6edf3_000Tb4b4b4)Tb4b4b4)
Te6edf3assertFalseTb4b4b4(Te6edf3heardJustNowTb4b4b4(Te6edf3lastHeard Tff7b72= T79c0ff9T79c0ff0T79c0ff0Tb4b4b4, Te6edf3nowSeconds Tff7b72= T79c0ff1Te6edf3_000Tb4b4b4)Tb4b4b4)
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.2 - Generated in 0.08s